package com.sk.myview;

import com.sk.water.R;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

public class TodayTask extends LinearLayout {
	private Context context;
	private TextView taskDone, taskUndo, xunjiandianDone, xunjiandianUndo;
	private int taskDoneCount, taskUndoCount, xunjiandianDoneCount,
			xunjiandianUndoCount;
	private int configid;

	public TodayTask(Context context) {
		super(context);
		LayoutInflater.from(context).inflate(R.layout.today_task, this);
		this.context = context;
		
	}

	public TodayTask(Context context, AttributeSet attributeSet) {
		super(context, attributeSet);
		LayoutInflater.from(context).inflate(R.layout.today_task, this);
		this.context = context;

	}
	public void setConfigID(int id){
		configid = id;
	}
	public int getConfigID(){
		return configid;
	}

	public void setTaskDoneCount(int taskDoneCount) {
		taskDone = (TextView) findViewById(R.id.today_task_yiwanchengrenwu);
		this.taskDoneCount = taskDoneCount;
		taskDone.setText(String.valueOf(taskDoneCount));
	}

	public int getTaskDoneCount() {
		return taskDoneCount;
	}

	public void setTaskUndoCount(int taskUndoCount) {
		taskUndo = (TextView) findViewById(R.id.today_task_weiwanchengrenwu);
		this.taskUndoCount = taskUndoCount;
		taskUndo.setText(String.valueOf(taskUndoCount));
	}

	public int getTaskUndoCount() {
		return taskUndoCount;
	}

	public void setXunjiandianDoneCount(int xunjiandianDoneCount) {
		xunjiandianDone = (TextView) findViewById(R.id.today_task_yiwanchengxunjiandian);
		this.xunjiandianDoneCount = xunjiandianDoneCount;
		xunjiandianDone.setText(String.valueOf(xunjiandianDoneCount));
	}

	public int getXunjiandianDoneCount() {
		return xunjiandianDoneCount;
	}

	public void setXunjiandianUndoCount(int xunjiandianUndoCount) {
		xunjiandianUndo = (TextView) findViewById(R.id.today_task_weiwanchengxunjiandian);
		this.xunjiandianUndoCount = xunjiandianUndoCount;
		xunjiandianUndo.setText(String.valueOf(xunjiandianUndoCount));
	}

	public int getXunjiandianUndoCount() {
		return xunjiandianUndoCount;
	}
	public void initialize(){
		
		setClickable(true);
		setBackgroundResource(R.drawable.single_choice);
	}
	

	
	
}
